import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import axios from 'axios'
import index from './views/Index.vue'
import me from './views/Me.vue'
import order from './views/Order.vue'
//import VueSocketio from 'vue-socket.io'
import socketio from './socket'

axios.defaults.baseURL = 'http://127.0.0.1:4000'
Vue.prototype.axios = axios;
Vue.prototype.$sockets = socketio

Vue.use(MintUI)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
//////////////

/* this.$sockets.on("backme", data => {
  console.log(data);

  
  var chatareaEle = document.getElementsByClassName("chatarea")[0];
  var messageItem = document.createElement("div");
   messageItem.innerHTML = `<div class="chart-item">
                 <div class="user-face">
                <img src=${data.face} alt="">
                </div> 
                <div>${data.uname}</div>
                <div class="user-message">${data.text}</div>
                </div>`; 
  chatareaEle.appendChild(messageItem);
});  */